<template>
  <div class="daohang">
    <van-tabs  v-model:active="active" title-active-color="#FF552E" sticky>
         <van-tab  title="推荐"  :to="{
          name:'Tuijina',
         }"></van-tab>
      <van-tab v-for="item in daohangList"
       :title="item.name" 
       :key="item.shortName"
       :to="{
         name:'QeiHuan',
         query:{
           qh:item.shortName,
           name:item.name,
         }
       }"
      >
      </van-tab>
    </van-tabs>
  </div>
</template>
<script>
import { getDaohang } from "@/api/roomList";
export default {
  data() {
    return {
      daohangList: [],
    };
  },
  created() {
    this.shuju();
  },
  methods: {
    async shuju() {
      let params = {
        cid: "",
        ct: "",
      };
      let res = await getDaohang(params);
      // console.log("数据请求成功", res);
      this.daohangList = res.data;
    },
  },
  
};
</script>

<style lang="scss" scoped>
.daohang {
  width: 7.8rem;
  margin-top: .3rem;
}
::v-deep .van-tab__text{
  font-size: 0.3rem;
  margin-left: .4rem;
  font-weight: 600;
}
::v-deep .van-tabs__line{
    width: .8rem;
    margin-left: .2rem;
    height: .04rem;
    margin-top: .2rem;
} 
</style>